//
//  FileOperateCell.m
//  wanzhaoIM
//
//  Created by liuyuantao on 15/5/7.
//  Copyright (c) 2015年 liuyuantao. All rights reserved.
//

#import "FileOperateCell.h"
#import "JKAlertDialog.h"
@implementation FileOperateCell

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(IBAction)downPressed:(id)sender
{
    if ([self.fileOperateCellDelegate respondsToSelector:@selector(FileOperateCellDidDownPressedWithIndexPath:)]) {
        [self.fileOperateCellDelegate FileOperateCellDidDownPressedWithIndexPath:self.indePath];
    }
}


-(IBAction)open:(id)sender
{
    if ([self.fileOperateCellDelegate respondsToSelector:@selector(FileOperateCellDidOpenWithIndexPath:)]) {
        [self.fileOperateCellDelegate FileOperateCellDidOpenWithIndexPath:self.indePath];
    }
}
-(IBAction)forward:(id)sender
{
    if ([self.fileOperateCellDelegate respondsToSelector:@selector(FileOperateCellDidForwardWithIndexPath:)]) {
        [self.fileOperateCellDelegate FileOperateCellDidForwardWithIndexPath:self.indePath];
    }
}
-(IBAction)del:(id)sender
{
    JKAlertDialog *alert = [[JKAlertDialog alloc]initWithTitle:nil message:@"确定删除该文件吗？"];
    [alert addButton:Button_OK withTitle:@"删除" handler:^(JKAlertDialogItem *item) {
        if ([self.fileOperateCellDelegate respondsToSelector:@selector(FileOperateCellDidDelWithIndexPath:)]) {
            [self.fileOperateCellDelegate FileOperateCellDidDelWithIndexPath:self.indePath];
        }

    }];
    
    [alert addButton:Button_CANCEL withTitle:@"取消" handler:^(JKAlertDialogItem *item) {
        
        
    }];
    [alert show];

    
    
    
   }


@end
